<template functional>
  <a-sub-menu :key="props.menuInfo.path">
    <span slot="title">
      <a-icon 
        v-if="props.menuInfo" 
        :type="props.menuInfo.meta.icon" 
      /><span>{{ props.menuInfo.title }}</span>
    </span>
    <template v-for="item in props.menuInfo.children">
      <a-menu-item v-if="!item.children" :key="item.path" @click="() =>$route.push({path:item.key, query: parent.$route.query})">
        <a-icon 
          v-if="props.menuInfo" 
          :type="props.menuInfo.meta.icon"
        />
        <span>{{ item.title }}</span>
      </a-menu-item>
      <sub-menu v-else :key="item.path" :menu-info="item" />
    </template>
  </a-sub-menu>
</template>
<script>
export default {
  props: ['menuInfo'],
  mounted() {
    window.window.console.log()
  }
};
</script>